Skip to content

Improve styleguidist integration #44

Merged
merged 11 commits into from
Sep 8, 2020
Merged

Conversation

campb303
Copy link
Collaborator

@campb303 campb303 commented Sep 8, 2020

Styleguidist has been consolidated with a folder structure that is maintainable. It can be accessed using npm scripts:

  • npm run start:docs will start a local development server on port 6060 and serve the docs while refreshing to show changed with any file in /src changes.
  • npm run build:docs will build a static payload of docs in /styleguidist/frontend-docs

The following still needs to be done:

  • Components need to be moved into /src/components/<ComponentName> with an index, component and example file like this:
src/
├── components
│   ├── ComponenetName
│   │   ├── ComponenetName.js         // The Component
│   │   ├── ComponenetName.md         // The Example
│   │   └── index.js                  // Exports the Component
  • Components need to be updated to support propTypes and defaultProps. ItemTable has this support already and it looks like this:
ItemTable.propTypes = {
	/** Function to set active item on row click. */
	"setActiveItem": PropTypes.func.isRequired,
	/** Function to toggle sidebar on row click. */
	"setSidebarOpen": PropTypes.func.isRequired
}
  • Guide docs need to be written showing the intended usage for existing components

@campb303 campb303 merged commit bf67aa7 into master Sep 8, 2020
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant